package pers.qianyu.service;

import org.springframework.cloud.openfeign.*;
import org.springframework.web.bind.annotation.*;
import pers.qianyu.domain.*;

// 参数为服务提供者名称
@FeignClient("service-product")
public interface ProductService {
    @GetMapping("/product/{pid}")
    Product findById(@PathVariable("pid") Integer pid);

    @GetMapping("/product/reduceInventory")
    void reduceInventory(@RequestParam("pid") Integer pid, @RequestParam("num") Integer number);
}
